#include <iostream>
using namespace std;

int main()
{
    int n, res = 0;
    cin >> n;
    for (int i = 1; i <= n; ++i)
    {
        int a;
        cin >> a;
        if (i % 2)
            res ^= a;
    }
    if (res)
        cout << "Yes";
    else
        cout << "No";
    return 0;
}